package com.wumart.scaffold.web.common.enums;


/**
 * 响应码及说明定义
 */
public enum CodeMsg {

    // 0000 处理成功
    SUCC("0000", "成功"),
    // 0001 处理失败
    FAIL("9999", "失败"),

    // // 1 开头表示常见通用异常
    ERR_PARAMETER_CHECK("1001", "参数校验异常"),
    ERR_DATABASE_EXEC("1002", "数据库操作异常"),
    ERR_BUSSINESS_EXEC("1003", "业务处理失败"),
    ERR_NEED_LOGIN_EXEC("9800", "登录异常"),
    ERR_HAS_NO_VENDER_EXEC("9900", "无商家权限异常"),
    UNKNOWN_ERR("ERRO", "未知错误");


    private String code;
    private String msg;

    CodeMsg(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }



    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return "CodeMsg{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
